home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
g_man
/
cat3
/
standard
/
clipplane.z
/
clipplane
Wrap
Text File
|
1998-10-20
|
6KB
|
133 lines
cccclllliiiippppppppllllaaaannnneeee((((3333GGGG)))) cccclllliiiippppppppllllaaaannnneeee((((3333GGGG))))
NNNNAAAAMMMMEEEE
cccclllliiiippppppppllllaaaannnneeee - specify a plane against which all geometry is clipped
CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
vvvvooooiiiidddd cccclllliiiippppppppllllaaaannnneeee((((iiiinnnnddddeeeexxxx,,,, mmmmooooddddeeee,,,, ppppaaaarrrraaaammmmssss))))
lllloooonnnngggg iiiinnnnddddeeeexxxx,,,, mmmmooooddddeeee;;;;
ffffllllooooaaaatttt ppppaaaarrrraaaammmmssss[[[[]]]];;;;
PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
_i_n_d_e_x expects an integer in the range 0 through 5, indicating which of
the 6 clipping planes is being modified.
_m_o_d_e expects one of three tokens:
CCCCPPPP____DDDDEEEEFFFFIIIINNNNEEEE: use the plane equation passed in _p_a_r_a_m_s to define a
clipplane. The clipplane is neither enabled nor disabled.
CCCCPPPP____OOOONNNN: enable the (previously defined) clipplane.
CCCCPPPP____OOOOFFFFFFFF: disable the clipplane. (default)
_p_a_r_a_m_s expects an array of 4 floats that specify a plane equation. A
plane equation is usually thought of as a 4-vector [A,B,C,D].
In this case, A is the first component of the _p_a_r_a_m_s array, and
D is the last. A 4-component vertex array (see vvvv4444ffff) can be
passed as a plane equation, where vertex X becomes A, Y becomes
B, etc. The specified contents of _p_a_r_a_m_s are insignificant when
_m_o_d_e is CCCCPPPP____OOOONNNN, or CCCCPPPP____OOOOFFFFFFFF.
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
Geometry is always clipped against the boundaries of a 6-plane frustum in
_x, _y, and _z. cccclllliiiippppppppllllaaaannnneeee allows the specification of additional planes, not
necessarily perpendicular to the _x, _y, or _z axes, against which all
geometry is clipped. Up to 6 additional planes can be specified.
Because the resulting clipping region is always the intersection of the
(up to) 12 half-spaces, it is always convex.
cccclllliiiippppppppllllaaaannnneeee specifies a half-space using a 4-component plane equation.
When it is called with mode CCCCPPPP____DDDDEEEEFFFFIIIINNNNEEEE, this object-coordinate plane
equation is transformed to eye-coordinates using the inverse of the
current ModelView matrix.
A defined clipplane is then enabled by calling cccclllliiiippppppppllllaaaannnneeee with the CCCCPPPP____OOOONNNN
argument, and with arbitrary values passed in _p_a_r_a_m_s. While drawing
after a clipplane has been defined and enabled, each vertex is
transformed to eye-coordinates, where it is dotted with the transformed
clipping plane equation. Eye-coordinate vertexes whose dot product with
the transformed clipping plane equation is positive or zero are in, and
require no clipping. Those eye-coordinate vertexes whose dot product is
negative are clipped. Because cccclllliiiippppppppllllaaaannnneeee clipping is done in eye-
coordinates, changes to the projection matrix have no effect on its
operation.
PPPPaaaaggggeeee 1111
cccclllliiiippppppppllllaaaannnneeee((((3333GGGG)))) cccclllliiiippppppppllllaaaannnneeee((((3333GGGG))))
By default all six clipping planes are undefined and disabled. The
behavior of an enabled but undefined clipplane is undefined.
NNNNOOOOTTTTEEEESSSS
IRIS-4D models G, GT, and GTX, and the Personal Iris, do not implement
cccclllliiiippppppppllllaaaannnneeee. Use ggggeeeettttggggddddeeeesssscccc to determine whether user-defined clipping
planes are supported.
cccclllliiiippppppppllllaaaannnneeee cannot be used while mmmmmmmmooooddddeeee is MMMMSSSSIIIINNNNGGGGLLLLEEEE.
A point and a normal are converted to a plane equation in the following
manner:
point = [Px,Py,Pz]
normal = |Nx|
|Ny|
|Nz|
plane equation = |A|
|B|
|C|
|D|
A = Nx
B = Ny
C = Nz
D = -[Px,Py,Pz] dot |Nx|
|Ny|
|Nz|
BBBBUUUUGGGGSSSS
On Impact and Infinite Reality cccclllliiiippppppppllllaaaannnneeee cannot be used with ddddeeeepppptttthhhhccccuuuueeee
PPPPaaaaggggeeee 2222